package cn.iocoder.yudao.module.resource.dal.mysql.relation;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.resource.dal.dataobject.relation.ResourceCategoryRelationDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 资源分类关联 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface ResourceCategoryRelationMapper extends BaseMapperX<ResourceCategoryRelationDO> {

    default List<ResourceCategoryRelationDO> selectListByMaterialId(Long materialId) {
        return selectList(ResourceCategoryRelationDO::getMaterialId, materialId);
    }

    default List<ResourceCategoryRelationDO> selectListByCategoryId(Long categoryId) {
        return selectList(ResourceCategoryRelationDO::getCategoryId, categoryId);
    }

}
